//define effect names
#define PLAYER_EFFECT_SINK 1
#define PLAYER_EFFECT_EXPLODE 2
#define PLAYER_EFFECT_WHIRL_POOL 3

// used for rendering text
typedef struct
{
	float r,g,b,a;
} Color;

// used in most 
typedef struct
{
	float x, y, z;
} Location;

// technically the same as location but a more general name
typedef struct
{
	float x, y, z;
} XYZ;

// all information about a specific vertex
typedef struct
{
	GLfloat location[3];
	GLfloat tex[2];
	GLfloat normal[3];
	GLfloat colour[4];
	GLubyte padding[16]; // Pads the struct out to 64 bytes for performance increase
} Vertex;

typedef struct
{
	/* Variables used for rendering */
    GLuint vBufferID;
    GLuint iBufferID;
	
	// the arrays for direct rendering
	Vertex *varray;
	int *iarray;
	
	// array sizes
	int vArraySize;
	int iArraySize;
	
	float radius;
	XYZ max;
	XYZ min;
	
	XYZ meshCenter;
	
	// texture id
	int texture;
} ObjectMesh;

typedef struct
{
	Location pos;
	ObjectMesh *mesh;
	XYZ angle;
} StaticObject;

typedef struct 
{
	char identifier[20];
	int score;
	int death;
	int life;
	
	int isDead;
	
	int weapon;
	int ammo;
	float lastShootTime;
	
	Location pos;
	ObjectMesh *mesh;
	
	XYZ angle;
	XYZ angleRotation;
	
	float speed;
	float directionalVelocity;
	XYZ velocity;
	
	float force;
	float mass;
	float maxVelocity;
	
	int effect;
	float effect_timer;
	
	int partsUsed;
	StaticObject *parts;
	
	float cameraAngle;
} PlayerObject;

typedef struct
{
	char identifier[20];
	
	int model;
	int texture;
	
	Location pos;
	Location pos_orig;
	XYZ angle;
	XYZ velocity;
	float mass;
	
	int effect;
	float effect_timer;
	
	int visible;
	int collideType;
	
	int lastCollision;
	
	void *collisionFunction;
	void *animationFunction;
	GLhandleARB shader;
} CollisionObject;

typedef struct
{
	XYZ angle;
	Location pos;
	XYZ velocity;
	int model;
	int texture;
	void *animationFunction;
	
	PlayerObject *player;
	
	int damage;
	int killAnimation;
} Bullet;

